//
//  UIBaseViewController.m
//  TTAddressBook
//
//  Created by wangming on 11-12-27.
//  Copyright (c) 2011年 __MyCompanyName__. All rights reserved.
//

#import "UIBaseViewController.h"

#import "AppDelegate.h"

#import "CommTools.h"
#import "define.h"
#import "imagePath.h"
#import "UICustomView.h"
#import "selectContacts.h"

@implementation UIBaseViewController

-(void) ContactAction{
    
}
- (void) CreateClearBackBtn{
    UIButton* backgroundBtn = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, 320, 480)];
    [backgroundBtn addTarget:self action:@selector(hideMenu) forControlEvents:UIControlEventTouchUpInside]; 
    backgroundBtn.backgroundColor = [UIColor clearColor];
    backgroundBtn.tag = MENUVIEW_TAG;
    [self.navigationController.view addSubview:backgroundBtn];
    [backgroundBtn release];
}
-(void) hideMenu{
    for(UIView* u in self.navigationController.view.subviews){
        if (u.tag == MENUVIEW_TAG) {
            [u removeFromSuperview];
        }
    }
}

-(void) ChooseContact{

}

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    
    if (self) 
    {
        // Custom initialization
    } 
    return self;
}


- (void)didReceiveMemoryWarning
{
    // Releases the view if it doesn't have a superview.
    [super didReceiveMemoryWarning];
    
    // Release any cached data, images, etc that aren't in use.
}

- (void)dealloc
{
    [super dealloc];
}


// Implement viewDidLoad to do additional setup after loading the view, typically from a nib.
- (void)viewDidLoad
{
    [super viewDidLoad];
    self.view.frame = CGRectMake(0, 0, 320, 480);
    [self.view setBackgroundColor:[UIColor whiteColor]];
    
    /*UIImageView *backgroundView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 320, 480)];
    backgroundView.image = [UIImage imageNamed:@"background.png"];
    [self.view addSubview:backgroundView];
    [backgroundView release];*/
}


- (void)viewDidUnload
{
    [super viewDidUnload];
    // Release any retained subviews of the main view.
    // e.g. self.myOutlet = nil;
}

- (void)viewWillAppear:(BOOL)animated
{
    
}

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
    // Return YES for supported orientations
    return (interfaceOrientation == UIInterfaceOrientationPortrait);
}





@end
